/**
 * 
 */
package STUDENTS.DANGTIENLONG.MVC.Ex02;

/**
 * @author Tien Long
 *
 */
public class Models {
	public double CalElement(Calculators obj){
		double dResult = 0;
		switch(obj.getbOpt()){
		case 0: dResult = obj.getdNumA()+obj.getdNumB(); break;
		case 1: dResult = obj.getdNumA()-obj.getdNumB(); break;
		case 2: dResult = obj.getdNumA()*obj.getdNumB(); break;
		case 3: dResult = obj.getdNumA()/obj.getdNumB(); break;
		default: break;
		
		}
		return dResult;
	}
}
